{% extends 'html/all.html' %}
{% block title %}
    消息
{% endblock %}
{% block content %}
    <div id="content"></div>
{% endblock %}
{% block scripts %}
    <script>
        var username = localStorage.getItem('username');
        var token = localStorage.getItem('token');

        var contentDiv = document.getElementById('content');

        if (username && token) {
            contentDiv.innerHTML = '<iframe src="https://chat.boqikc.com" width="100%" height="870px" allow="camera;microphone"><p>Your browser does not support iframes.</p></iframe>';
        } else {
            contentDiv.innerHTML = '<p>请先登录！</p>';
        }
    </script>
{% endblock %}